package com.bootx.entity;

import com.fasterxml.jackson.annotation.JsonView;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

@Entity
public class AiRoleChatMessage extends BaseEntity<Long>{

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable=false,updatable=false)
    private AiRole aiRole;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable=false,updatable=false)
    private Member member;

    @NotEmpty
    @Column(nullable = false,updatable = false,columnDefinition = "longtext")
    @JsonView({ListView.class})
    private String content;

    @NotNull
    @Column(nullable=false,updatable=false)
    @JsonView({ListView.class})
    private MessageType messageType;

    public AiRole getAiRole() {
        return aiRole;
    }

    public void setAiRole(AiRole aiRole) {
        this.aiRole = aiRole;
    }

    public Member getMember() {
        return member;
    }

    public void setMember(Member member) {
        this.member = member;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public MessageType getMessageType() {
        return messageType;
    }

    public void setMessageType(MessageType messageType) {
        this.messageType = messageType;
    }
}
